﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true" culture="auto" meta:resourcekey="PageResource1" uiculture="auto"
    CodeFile="TruckStatusList.aspx.cs" Inherits="SystemManage_TruckStatusList" Title="车辆动状态列表" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="title"><asp:Label ID="lblPageType" runat="server" Text="车辆动状态列表" meta:resourcekey="lblPageTypeResource1"></asp:Label></div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="list_title">
             <div class="autoleft">
                &nbsp;<asp:Label ID="lblTotal" runat="server" 
                     meta:resourcekey="lblTotalResource1"></asp:Label><asp:Label ID="lblRecordFound" runat="server" Text="条记录" meta:resourcekey="lblRecordFoundResource1"></asp:Label>&nbsp;&nbsp;&nbsp;<a href="TruckStatusEdit.aspx"><asp:Label
                    ID="lblTruckStatusAdd" runat="server" Text="添加动态状态" meta:resourcekey="lblTruckStatusAddResource1"></asp:Label></a></div>                   
                    <div class="autoright">
                        <asp:Label ID="lblPerPageDisplay" runat="server" Text="每页显示" meta:resourcekey="lblPerPageDisplayResource1"></asp:Label>：
                        <asp:DropDownList ID="ddlPages" runat="server" AutoPostBack="True" 
                            OnSelectedIndexChanged="ddlPages_SelectedIndexChanged" 
                            meta:resourcekey="ddlPagesResource1">
                            <asp:ListItem Selected="True" Text="10" Value="10" 
                                meta:resourcekey="ListItemResource1"></asp:ListItem>
                            <asp:ListItem Text="15" Value="15" meta:resourcekey="ListItemResource2"></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                     </div>
            <asp:GridView ID="gvTTList" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                Width="100%" OnPageIndexChanging="gvTTList_PageIndexChanging" OnRowCommand="gvTTList_RowCommand"
                OnSorting="gvTTList_Sorting" AllowSorting="True" 
                onrowdatabound="gvTTList_RowDataBound" 
                meta:resourcekey="gvTTListResource1">
                <PagerTemplate>
                    <table style="width: 100%">
                        <tr>
                            <td>
                                <asp:Label ID="lblCurrentPage" runat="server" Text="页次" meta:resourcekey="lblCurrentPageResource1"></asp:Label>:&nbsp;<asp:Label 
                                    ID="Label1" runat="server" 
                                    Text='<%# ((GridView)Container.Parent.Parent).PageIndex+1 %>' 
                                    meta:resourcekey="Label1Resource1"></asp:Label>/<asp:Label
                                    ID="Label2" runat="server" 
                                    Text='<%# ((GridView)Container.Parent.Parent).PageCount %>' 
                                    meta:resourcekey="Label2Resource1"></asp:Label>&nbsp;
                                <asp:Label ID="lblTotalPage" runat="server" Text="总计" meta:resourcekey="lblTotalPageResource1"></asp:Label>:&nbsp;<asp:Label 
                                    ID="Label3" runat="server" 
                                    Text="<%# ((System.Data.DataView)gvTTList.DataSource).Count %>" 
                                    meta:resourcekey="Label3Resource1"></asp:Label>
                            </td>
                            <td align="right">
                                <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Page" CommandArgument="First"
                                    Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" 
                                    Text="首页" meta:resourcekey="LinkButton1Resource1"></asp:LinkButton>
                                <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="Prev" CommandName="Page"
                                    Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" 
                                    Text="前页" meta:resourcekey="LinkButton2Resource1"></asp:LinkButton>
                                <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Page" CommandArgument="Next"
                                    
                                    Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>" 
                                    Text="后页" meta:resourcekey="LinkButton3Resource1"></asp:LinkButton>
                                <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="Last" CommandName="Page"
                                    
                                    Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>" 
                                    Text="尾页" meta:resourcekey="LinkButton4Resource1"></asp:LinkButton>&nbsp;
                               <asp:Label ID="lblTurnOn" runat="server" Text="转第" meta:resourcekey="lblTurnToResource1"></asp:Label>
                                <asp:TextBox ID="txtPages" runat="server" Width="35px" 
                                    meta:resourcekey="txtPagesResource1"></asp:TextBox>
                                    <asp:Label ID="lblPages2" runat="server" Text="页" meta:resourcekey="lblPages2Resource1"></asp:Label>
                                    <asp:LinkButton ID="lbtnGo" runat="server" Text="提交" onclick="lbtnGo_Click" 
                                    meta:resourcekey="lbtnGoResource1"></asp:LinkButton>
                            </td>
                        </tr>
                    </table>
                </PagerTemplate>
                <Columns>
                    <asp:TemplateField HeaderText="状态" SortExpression="StatusName" 
                        meta:resourcekey="TemplateFieldResource1">
                        <ItemTemplate>
                            <asp:Label ID="lblStatusName" runat="server" Text='<%# Eval("StatusName") %>' 
                                meta:resourcekey="lblStatusNameResource1"></asp:Label>
                                <asp:Label ID="lblHKStatusName" runat="server" Text='<%# Eval("HKStatusName") %>' ></asp:Label>
                                <asp:Label ID="lblENGStatusName" runat="server" Text='<%# Eval("ENGStatusName") %>' ></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="次序" SortExpression="Sequence" 
                        meta:resourcekey="TemplateFieldResource2">
                        <ItemTemplate>
                            <asp:Label ID="lblSequence" runat="server" Text='<%# Eval("Sequence") %>' 
                                meta:resourcekey="lblSequenceResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="20%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="下一动态间隔（小时）" SortExpression="Interval" 
                        meta:resourcekey="TemplateFieldResource3">
                        <ItemTemplate>
                            <asp:Label ID="lblInterval" runat="server" Text='<%# Eval("Interval") %>' 
                                meta:resourcekey="lblIntervalResource1"></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="20%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作" meta:resourcekey="TemplateFieldResource4">
                        <ItemTemplate>
                            <a href='TruckStatusEdit.aspx?PKID=<%# Eval("PKID") %>'>
                                <asp:Label ID="lblUpdate" runat="server" Text="修改" meta:resourcekey="lblUpdateResource1"></asp:Label></a>
                            <asp:LinkButton ID="lbtnDel" runat="server" Text="删除" CommandArgument='<%# Eval("PKID") %>'
                                OnClientClick=<%#"javascript:return confirm(\""+   Resources.Messages.DelRecord  +"\")"%> CommandName="Del" 
                                meta:resourcekey="lbtnDelResource1"></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle Width="10%" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle HorizontalAlign="Center" />
                <RowStyle HorizontalAlign="Center" />
            </asp:GridView>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
